package model.collect;

public class pedEvent {
	
	public pedEvent(int beginnum, int endnum, long begintime, long endtime,
			String deviceid, String zoneid) {
		super();
		
	}
	private String [] msgs;
    public pedEvent(String msg){
    	
    	msgs = msg.split(";");
		for (int i = 0; i < msgs.length; i++) {
			String tmp = msgs[i];
			switch (i){
			case 0 :
				devid=tmp;
				break;
			case 1 :
				if (!tmp.equalsIgnoreCase("NULL")){
					this.zoneid=tmp;
					
				}
				break;
				
			case 2 :
				if (!tmp.equalsIgnoreCase("NULL")){
					this.EventNum=tmp;
				}
				break;
			case 3 :
				if (!tmp.equalsIgnoreCase("NULL")){
					this.state=Integer.parseInt(tmp);
				}
				break;
			case 4 :
				if (!tmp.equalsIgnoreCase("NULL")){
					this.beginnum=tmp;
				}
				break;
			case 5 :
				if (!tmp.equalsIgnoreCase("NULL")){
					this.time=Long.parseLong(tmp)+8*3600;
				}	
			
			
			}
			
		}
	}
	private String beginnum;//state=1,wei null
	private String EventNum;
	private long time;
	private String devid;
	private String zoneid;
	private int state;//1begin;0end;
	
	
	
	public String getBeginnum() {
		return beginnum;
	}
	public void setBeginnum(String beginnum) {
		this.beginnum = beginnum;
	}
	public String getEventNum() {
		return EventNum;
	}
	public void setEventNum(String eventNum) {
		EventNum = eventNum;
	}
	public long getTime() {
		return time;
	}
	public void setTime(long time) {
		this.time = time;
	}
	public String getDevid() {
		return devid;
	}
	public void setDevid(String devid) {
		this.devid = devid;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	
	public String getZoneid() {
		return zoneid;
	}
	public void setZoneid(String zoneid) {
		this.zoneid = zoneid;
	}

	
}
